var B44HT5_ly_index = "";

//业务逻辑数据开始
function B44HT5_start(input) {
	B44HT5_clear_input();
	B44HT5_ly_index = input.ly_index;
	layer.close(ly_index);
    /*biz begin*/

	$("#B44HT5_btnUpd").click(function(){
		$("#B44HT5_error_info").html("");
		
		var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}');
		if (!pwdRegex.test($("#B44HT5_new_pwd").val())) {
			$("#B44HT5_error_info").html("<font color='red'>提交失败,您的密码复杂度太低（密码中必须包含大小写字母、数字、特殊字符）!</fond>");
			//swal("提交失败!", "失败原因:您的密码复杂度太低（密码中必须包含大小写字母、数字、特殊字符）,最小8位", "warning");
			return false;
		}
		else if ($("#B44HT5_new_pwd").val() != $("#B44HT5_new_pwd2").val()) {
			$("#B44HT5_error_info").html("<font color='red'>提交失败,密码输入不一致</fond>");
			//swal("提交失败!", "失败原因:密码重复不一致", "warning");
			return false;
		}
		$("#B44HT5_error_info").html("<font color='green'>密码校验通过</fond>");
		
		ly_index = layer.load();
		var inputdata = {
            param_name: "T_UPD_PWD",
            session_id: session_id,
            param_value1:$("#B44HT5_new_pwd").val(),
            param_value2:$("#B44HT5_init_pwd").val(),
            param_value3:login_id
        };
		get_ajax_staticurl(inputdata, "B44HT5_get_T_UPD_PWD");
	});
    /*biz end*/
}

//清除输入框
function B44HT5_clear_input(){
	$("#B44HT5_init_pwd").val("");
	$("#B44HT5_new_pwd").val("");
	$("#B44HT5_new_pwd2").val("");
	$("#B44HT5_error_info").html("");   	
}

//取消编辑
$("#B44HT5_cancel").click(function () {
	layer.close(B44HT5_ly_index);
})


function B44HT5_get_T_UPD_PWD(input) {
	$("#B44HT5_error_info").html("");
    layer.close(ly_index);
    //操作失败
    if (Call_OpeResult(input.T_UPD_PWD) == true)
    {
		swal("修改密码成功!", "", "success");
		layer.close(B44HT5_ly_index);
    }
    else
		$("#B44HT5_error_info").append("<font color='red'>密码更改失败！</font>");    	
}